<template>
  <div class="home-banner">

    <XtxCarousel :imgList="sliders" />
<!-- <lbt :width="'800'" :height="'300'" :imgList="list"/> -->
  </div>
</template>
<script>
import { ref } from 'vue'
import { findBanner } from '@/api/home'

export default {
  name: 'HomeBanner',
  setup () {
    // 调用广告图api
    const sliders = ref([])
    const list = ref([])
    findBanner().then(res => {
      console.log(res.result)
      sliders.value = res.result
      list.value = res.result.map(item => item.imgUrl)
      console.log(list.value)
    })
    return {
      sliders,
      list
    }
  }
}
</script>
<style scoped lang="less">
.home-banner {
  width: 1240px;
  height: 500px;
  position: absolute;
  left: 269px;
  top: 185px;
  z-index: 98

}

// vue3
.xtx-carousel {
  :deep(.carousel-btn.prev) {
    left: 270px;
  }
  :deep(.carousel-indicator) {
    padding-left: 250px;
  }
}
</style>
